general

In the design of the <#91#>Pascal<#91#> templates it has been tried to make them as general as possible. However, the original <#92#>Pascal<#92#> definition is too restricted for easy code generation, so that a number of assumptions had to be made. They are:
  1. The <#94#>Pascal<#94#> compiler distinguishes uppercase and lowercase characters in symbols. That is, <#95#>ZWOING<#95#> is different from <#96#>zwoing<#96#>, and both are different from <#97#>ZwoInG<#97#>.
  2. There is no (or a large) upper bound to the number of significant characters in symbol names. At least the characters of the type, constructor and element names and 6 additional characters must be significant.
  3. The following standard functions and procedures are available.
    verbatim6#
  4. The type of the file handles for <#100#>read<#100#> and <#101#>write<#101#> is <#102#>text<#102#>.

In all record types generated by these templates a <#104#>next<#104#> field is included that is used to create linked lists of the records. Therefore, the type of a single element and a list of these elements is the same. For clarity different type names are introduced for single elements and lists.

Due to the strict syntax of <#105#>Pascal<#105#>, the template must be split up in a number of parts, one for the <#106#>var<#106#>, <#107#>type<#107#> and code sections. This is also true for the code library. Therefore, the following template files are provided:

file name section purpose
pascode.pt (code) Code template.
pascode.ht (code) external declaration template.
paslib.pt (code) Library of functions.
paslib.ht (code) external declaration of library functions.
pastype.pt type Type declaration template.
pasvar.pt var Variable declaration template.
pasgvar.pt var General variable declarations.

The files <#118#>pascode.ht<#118#> and <#119#>paslib.ht<#119#> are used for separate compilation, see section #sec:sepcomp#120>.